﻿@using ChampionsLeagueBets.Domain
@model IList<SettingGroup>

@{
    ViewBag.Title = "Ustawienia";
	ViewBag.Image = "~/Content/images/settings-64.png";
}

@using (Html.BeginForm())
{
	@Html.AntiForgeryToken()

	<div id="content">
		@foreach (var group in Model)
		{
			<fieldset class="form-data">
				<legend>@group.Name</legend>
				<table>
					@foreach (var item in group.Settings)
					{
						<tr>
							<th style="width: 400px">
								@item.Description (@item.Name):
							</th>
							<td>@Html.TextBox(@item.Id.ToString(), @item.Value)
							</td>
						</tr>
					}
				</table>
			</fieldset>
		}
	</div>
	<div class="ui-actions">
		@Html.SubmitButton("btnSubmit", "Zapisz")
		@(Html.ActionLink<HomeController>(c => c.Administration(), "Anuluj", new { @class = "link-button" }))
	</div>
}